package Operation;

import Book.BookList;

import java.util.Scanner;

public class ReturnBook implements IOperation{

    @Override
    public void work(BookList bookList) {
        Scanner scanner = new Scanner(System.in);
        String name = scanner.nextLine();
        for(int i = 0; i < bookList.getUsedBookList();i ++){
            if(bookList.GetBook(i).getName().equals(name)){
                bookList.GetBook(i).setLend(false);
            }
        }
        System.out.println("*****抱歉,没找到您要归还的图书的信息*****");
    }
}
